<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <?php
        if(isset($_POST['option']))
        {
            include("../Service/WebClass/report/KeywordService.php");

            $KeywordService = new KeywordService();
            $message = $KeywordService->updateAllKeywords();
            echo "<script language='javascript'>alert(\"".$message."\");</script>";
        }
    ?>
    <title>AD Listing</title>
    <link rel="stylesheet" href="../css/common.css" type="text/css" />
    <script language="JavaScript" src="../js/InputCheck.js" type="text/javascript"></script>
</head>

<body>
    <form enctype="multipart/form-data" name="mainform" method="post">
<input type="hidden" name="option" value="upAll"/>

        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="menu_path_left"></td>

                <td class="menu_path">レポート ＞ キーワード一括更新
                </td>
                <td class="menu_path_right"></td>
            </tr>
        </table>
        <br>
        <table width="100%" border="0" cellpadding="2" cellspacing="0">
            <tr>
                <td align="left">
                </td>
                <td align="right">

                    <input type="submit" class="btn save" value="" onclick="return checkSelect_kwdUpAll();">
                </td>
            </tr>
        </table>

        <table width="100%" border="0" cellpadding="4" cellspacing="0" class="tbl">
            <tr>
                <td class="td9" align="left" width="200">
                    <input type="checkbox" name="change_status" id="change_status" value="1" >
                    <?php
                        if($_POST['change_status'] == "1")
                        {
                            echo "<script>document.mainform.change_status.checked=true;</script>";
                        }
                    ?>
                    <label for="change_status">掲載オン/オフを切り替える</label>

                </td>
                <td class="td4 left">
                    <input type="radio" name="status" id="status1" value="1" ><label for="status1">オン</label>
                    <input type="radio" name="status" id="status0" value="0" checked><label for="status0">オフ</label>
                </td>
                <?php
                    if($_POST['status'] == "0")
                    {
                        echo "<script>document.mainform.status[1].checked=true;</script>";
                    }
                    else
                    {
                        echo "<script>document.mainform.status[0].checked=true;</script>";
                    }
                ?>
            </tr>
            <tr>
                <td class="td9 top" align="left">

                    <input type="checkbox" name="change_bid" id="change_bid" value="1" >
                    <?php
                        if($_POST['change_bid'] == "1")
                        {
                            echo "<script>document.mainform.change_bid.checked=true;</script>";
                        }
                    ?>
                    <label for="change_bid">入札額を変更する</label>
                </td>
                <td class="td4 border">
                    <input type="radio" name="change_bid_type" id="change_bid_type1" value="1" checked>
                    <label for="change_bid_type1">一律で次の入札額に変更</label>
                    <input type="text" name="type1_maxbid" size="6" maxlength="10" value="<?php echo $_POST['type1_maxbid'];?>" class="txBox">
                    <br><br>


                    <input type="radio" name="change_bid_type" id="change_bid_type2" value="2" >
                    <label for="change_bid_type2">次の割合で引き上げる</label>
                    <input type="text" name="type2_rate" size="3" maxlength="2" value="<?php echo $_POST['type2_rate'];?>" class="txBox">
                    ％
                    &nbsp;&nbsp;
                    ※ただし上限を
                    <input type="text" name="type2_maxbid" size="6" maxlength="10" value="<?php echo $_POST['type2_maxbid'];?>" class="txBox">
                    円とする
                    <br><br>

                    <input type="radio" name="change_bid_type" id="change_bid_type3" value="3" >

                    <label for="change_bid_type3">次の割合で引き下げる</label>
                    <input type="text" name="type3_rate" size="3" maxlength="2" value="<?php echo $_POST['type3_rate'];?>" class="txBox">
                    ％
                    &nbsp;&nbsp;
                    ※ただし最低を
                    <input type="text" name="type3_maxbid" size="6" maxlength="10" value="<?php echo $_POST['type3_maxbid'];?>" class="txBox">
                    円とする
                    <br><br>

                    <input type="radio" name="change_bid_type" id="change_bid_type4" value="4" >
                    <label for="change_bid_type4">キーワード別の入札額設定を削除し、広告グループのデフォルトの入札額を使用する</label>

                </td>
                <?php
                    if($_POST['change_bid_type'] == "4")
                    {
                        echo "<script>document.mainform.change_bid_type[3].checked=true;</script>";
                    }
                    else if($_POST['change_bid_type'] == "3")
                    {
                        echo "<script>document.mainform.change_bid_type[2].checked=true;</script>";
                    }
                    else if($_POST['change_bid_type'] == "2")
                    {
                        echo "<script>document.mainform.change_bid_type[1].checked=true;</script>";
                    }
                    else
                    {
                        echo "<script>document.mainform.change_bid_type[0].checked=true;</script>";
                    }
                ?>
            </tr>
            <tr>
                <td class="td9 top" align="left">
                    <input type="checkbox" name="change_url" id="change_url" value="1" >
                    <?php
                        if($_POST['change_url'] == "1")
                        {
                            echo "<script>document.mainform.change_url.checked=true;</script>";
                        }
                    ?>
                    <label for="change_url">ランディング先URLを変更する</label>
                </td>
                <td class="td4 border">

                    <input type="text" name="landing_url_keyword" size="60" maxlength="1000" value="<?php echo $_POST['landing_url_keyword'];?>" class="txBox">
                </td>
            </tr>
            <tr>
                <td class="td9 top" align="left">
                    <input type="checkbox" name="change_delete" id="change_delete" value="1" >
                    <?php
                        if($_POST['change_delete'] == "1")
                        {
                            echo "<script>document.mainform.change_delete.checked=true;</script>";
                        }
                    ?>
                    <label for="change_delete">削除する</label>
                </td>

                <td class="td4 border">
                    キーワードを削除する
                </td>
            </tr>
        </table>

    </form>						<!-- end of main area -->


    </td>
    <td class="frame_middle_right"></td>
    </tr>
    </table>

    </td>
    <td width="20"><br></td>
    </tr>
    </table>
    </form>
    <table width="100%" border="0" cellpadding="2" cellspacing="0">
        <tbody><tr>
                <td align="center">
                    <input class="btn close" onclick="javascript:self.close();" type="button">
                </td>
            </tr>
    </tbody></table>
</body>
</html>
